﻿#ifndef _EXCEPTION_H_
#define _EXCEPTION_H_
#include "ssCallStack.h"

namespace StarSeeker
{

class ssException
{
public:
	ssException();
	ssException(int errorNum);
	ssException(const char* message);
	ssException(const std::string& message);

	const char* GetErrorMsg();
	const char* GetStackTrace();
private:
	std::string		m_message;
	std::string		m_stackTrace;
};

#define SS_EXP_TRY try{
#define SS_EXP_CATCH }catch (ssException & err){
#define SS_STD_CATCH }catch (std::exception & err){
#define SS_EXP_END } catch (...){}
#define SS_THROW(str) throw ssException(str);
#define SS_THROW_IF(condition,err) if(condition) throw ssException(err);

}



#endif // !_EXCEPTION_H_
